package com.xzx.study.animation;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import com.xzx.study.R;

public class Setup2Activity extends AppCompatActivity implements View.OnClickListener {

    private Button setup2_previous;
    private Button setup2_next;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setup2);

        setup2_previous = findViewById(R.id.setup2_previous);
        setup2_previous.setOnClickListener(this);

        setup2_next = findViewById(R.id.setup2_next);
        setup2_next.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if (v == setup2_previous) {
            finish();
            overridePendingTransition(R.anim.left_in, R.anim.right_out);
        } else if (v == setup2_next) {
            startActivity(new Intent(this, Setup3Activity.class));
            overridePendingTransition(R.anim.right_in, R.anim.left_out);
        }
    }
}
